<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Vue入门</title>
		<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
		  <button type="button" v-on:click="add">{{count}}</button>
		</div>
		
		<script type="text/javascript">
			var app = new Vue({
				  el: '#app',
				  data: {
					count:0
				  },
				  methods:{
					  add:function(){
						  if(this.count==6){
							  this.count=0
							  }else{
								  this.count+=1
								  }
					  }
				  }
				})
		</script>
	</body>
</html>